package loss;
/**
 * Interface for loss function
 * @author tigerzhong
 *
 */
public interface LossFun {
    /**
     * Get Loss value
     * @param parameters
     * @param instance
     * @param target
     * @return loss value
     */
    public double getLoss(double[] parameters, double[] instance, double target);
    /**
     * Get sub-gradient
     * @param parameters
     * @param instance
     * @param target
     * @return sub-gradient
     */
    public double[] getGradient(double[] parameters, double[] instance, double target);
}
